import 'package:flutter/material.dart';

import '../../util.dart';
import 'index.dart';
import 'widgets/widgets.dart';

class VersionUpdateViewPage extends GetView<VersionUpdateViewController> {
  const VersionUpdateViewPage({super.key});

  // 主视图
  Widget _buildView() {
    return const Column(
      mainAxisAlignment: MainAxisAlignment.center,
      mainAxisSize: MainAxisSize.min,
      children: [
        VersionNewWidget(),
      ],
    );
  }

  @override
  Widget build(BuildContext context) {
    return PopScope(
      canPop: false,
      child: GetBuilder<VersionUpdateViewController>(
        builder: (_) {
          return Scaffold(
            backgroundColor: Colors.black54,
            body: Container(
              margin: EdgeInsets.symmetric(
                horizontal: 50.r,
              ),
              alignment: Alignment.center,
              child: _buildView(),
            ),
          );
        },
      ),
    );
  }
}
